
import request from '@/utils/request';


//分页查询
export function userlist(params){
      return request({
        url: '/dev-api/users/list',
        method: 'get',
        params
    })
}

//新增用户
export function addUser(data){
    return request({
        url: '/dev-api/users/register',
        method: 'post',
        data
    })
}

//删除用户
export function deleteUser(id){
    return request({
        url: `/dev-api/users/delete/${id}`,
        method: 'delete',
    })
}

//修改用户
export function updateUser(data){
    return request({
        url: '/dev-api/users/update',
        method: 'put',
        data
    })
}

//获取用户信息
export function getUserById(id){
    return request({
        url: `/dev-api/users/${id}`,
        method: 'get',
    })
}